home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 9
/
The PC-SIG Library on CD ROM - Ninth Edition.iso
/
301_400
/
DISK0315
/
DISK0315.ZIP
/
ISAMC.LBR
/
ISAMUPD.C
< prev
next >
Wrap
Text File
|
1984-11-28
|
768b
|
42 lines
/*
** ISAMC - Written by John M. Dashner
*/
#include <stdio.h>
#include <ctype.h>
#include <isam.h>
/*
** UPDATE - Control Record Update
*/
isamupd(hdr)
struct isam *hdr;
{
char buf[MAXKEY + 2];
struct rec1 *r1;
struct rec2 *r2;
r1 = (struct rec1 *) buf;
r2 = (struct rec2 *) buf;
lseek(hdr->q7, 0L, 0);
r1->ttl_recs = hdr->q1;
r1->del_recs = hdr->q2;
if (write(hdr->q7, buf, hdr->q6 + 2))
{
isam_err = 8;
return ERROR;
}
r2->srt_recs = hdr->q3;
r2->del_ptr = 0; /* not presently used */
if (write(hdr->q7, buf, hdr->q6 + 2))
{
isam_err = 8;
return ERROR;
}
return NULL;
}